/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/3/14.
	 */
	var FinanceDetail = React.createClass({displayName: "FinanceDetail",
	    getInitialState:function(){
	        return{
	            ProDetail:this.props.ProDetail
	        }
	    },
	    //导出PDF文件
	    exportPDF:function(){
	        //console.log(this.refs.getRealDom);
	        this.props.exportPDF.onClick(this.refs.getRealDom.outerHTML);
	    },
	    render:function(){
	        var _this = this, _state = _this.state,
	            ProDetail = _state.ProDetail.ProjectDetail,
	            FinancingDetail = _state.ProDetail.FinancingDetail;
	        //剩余时间
	        var RepayBegin = UFormatter.formatTime(ProDetail.RepayBegin,"yyyy/mm/dd");
	        var remain = Math.ceil((new Date(RepayBegin) - new Date()) / 1000 / 60 / 60 / 24);
	        if(remain < 0)
	            remain = 0;
	        //数字格式化
	        var TotalRepayment = UFormatter.formatMoney(Number(FinancingDetail.TotalRepayment),2),
	            IAmount = UFormatter.formatMoney(Number(ProDetail.IAmount),2),
	            FinancingCost = UFormatter.formatMoney(Number(FinancingDetail.FinancingCost),2);
	        return(
	            React.createElement("div", {className: "invest-detail"}, 
	                React.createElement("div", {ref: "getRealDom"}, 
	                    React.createElement("h1", null, 
	                        ProDetail.ProjectName, 
	                        React.createElement("span", {className: "tag " + ProDetail.F_StatusName.className}, 
	                            
	                                ProDetail.F_Status == 1 ? "还款中" :
	                                    ProDetail.F_Status == 2 ? "还款完成" :
	                                        ProDetail.F_Status == 3 ? "融资完成" :
	                                            ProDetail.F_Status == 4 ? "投标中" :
	                                                ProDetail.F_Status == 5 ? "预热中" :
	                                                    ProDetail.F_Status == 6 ? "项目流标" : ""
	                            
	                        ), 
	                        ProDetail.F_Status == 1 ?
	                            React.createElement("span", {className: "countdown-data"}, React.createElement("i", {className: "iconfont icon-clock"}), "距离还款日还有：", React.createElement("b", {className: "fc-main"}, remain, "天")) : ""
	                        
	                    ), 
	                    React.createElement("div", {className: "money"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", {className: "col-1"}, 
	                                React.createElement("p", {className: "fc-main"}, React.createElement("b", {className: "fs42"}, TotalRepayment), "元"), 
	                                React.createElement("p", {className: "fc-light"}, "到期应还资金总额")
	                            ), 
	                            React.createElement("li", {className: "col-2"}, 
	                                React.createElement("p", null, "还款日期", React.createElement("b", null, ProDetail.RepayBegin)), 
	                                React.createElement("p", null, "借款人", React.createElement("b", null, this.state.ProDetail.CallbackAccount.AccountName))
	                            )
	                        )
	                    ), 
	                    React.createElement("div", {className: "info"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", null, React.createElement("p", null, React.createElement("b", null, IAmount), "元"), 
	                                React.createElement("p", {className: "fc-light"}, "融资金额")), 
	                            React.createElement("li", null, React.createElement("p", {className: "fc-main"}, React.createElement("b", null, FinancingCost), "元"), 
	                                React.createElement("p", {className: "fc-light"}, "融资成本")), 
	                            React.createElement("li", null, React.createElement("p", {className: "fc-main"}, React.createElement("b", null, ProDetail.FinanceRate), "%"), 
	                                React.createElement("p", {className: "fc-light"}, "融资利率"))
	                        )
	                    ), 
	                    React.createElement("div", {className: "pro-data"}, 
	                        React.createElement("ul", {className: "clearfix"}, 
	                            React.createElement("li", null, "融资期限：", ProDetail.Duration+"天"), 
	                            React.createElement("li", null, "起息日：", ProDetail.ValueBegin), 
	                            React.createElement("li", null, "到期日：", ProDetail.RepayBegin)
	                        )
	                    ), 
	                    React.createElement("div", {className: "bank-back clearfix"}, 
	                        React.createElement("label", {className: "f-left"}, "回款账户："), 
	                        React.createElement("div", {className: "input f-left"}, 
	                            React.createElement("span", {className: "bank-logo "+this.state.ProDetail.CallbackAccount.BankLogo}), 
	                            React.createElement("span", null, this.state.ProDetail.CallbackAccount.AccountNo)
	                        )
	                    )
	                ), 
	                React.createElement("span", {className: "angle angle-right-bottom"})
	            )
	        )
	    }
	});

	var Root = React.createClass({displayName: "Root",
	    getInitialState:function(){
	        return{
	            ProDetail:PageDM.ProDetail.value,
	            realNameInfo:PageDM.realNameInfo.value
	        }
	    },
	    componentDidMount: function(){
	        var _this = this;
	        var PageDM = window.PageDM;
	        UEventHub.emit("pageLoad","hello world!");

	        //项目详情
	        UEventHub.on(PageDM.ProDetail.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                ProDetail:v
	            })
	        });
	        //个人实名信息
	        UEventHub.on(PageDM.realNameInfo.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.setState({
	                realNameInfo:v
	            })
	        });
	    },
	    render: function () {

	        return (
	            React.createElement("div", null, 
	                React.createElement("div", {className: "mod-account container"}, 
	                    React.createElement("div", {className: "account", style: {width:"870px",margin:"0 auto",minHeight:"auto"}}, 
	                        React.createElement(FinanceDetail, {url: PageDM.URL, ProDetail: this.state.ProDetail, exportPDF: PageDM.exportPDF, printBtn: PageDM.printBtn}), 
	                        React.createElement("div", {style: {textAlign:"center",marginTop:"20px"}}, 
	                            React.createElement("button", {id: "printBtn", className: "ucs-btn ucs-btn-confirm", onClick: PageDM.printBtn.onClick}, "打印")
	                        )
	                    ), 
	                    React.createElement("div", {className: "clear"})
	                )

	            )
	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null), document.getElementById('giraffe'));

/***/ }
/******/ ]);